
import numpy


def dot(a, b):
    return (a * b).sum()


norm = numpy.linalg.norm
    

def unit(a):
    return a / norm(a)
    
    
